fix(cli): sandbox get returns currently active runtime policy#880
Merged
TaylorMutch merged 3 commits intomainfrom Apr 20, 2026
Merged
Conversation
|
All contributors have signed the DCO ✍️ ✅ |
a632319 to
19be372
Compare
19be372 to
3a7b177
Compare
|
🌿 Preview your docs: https://nvidia-preview-pr-880.docs.buildwithfern.com/openshell |
Collaborator
Author
|
I have read the DCO document and I hereby sign the DCO. |
johntmyers
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the root cause described in #837:
openshell sandbox getnow fetches the effective runtime policy viaGetSandboxConfigfor all output modes — including hot-reloaded updates and gateway-global overrides. The base output also surfaces the policy source (sandbox or global) and revision number, so callers no longer need to stitch togethersandbox getandpolicy get --fulloutput.A
--policy-onlyflag is also added for scripting workflows:Related Issue
Fixes #837
Changes
sandbox getnow always callsGetSandboxConfigto retrieve the active runtime policy (replaces creation-time spec lookup)--policy-onlyflag toopenshell sandbox get; when set, prints only the active policy YAML to stdoutsandbox_get_policy_only_round_tripintegration test; updatedget_sandbox_configmock to return a realSandboxPolicydocs/sandboxes/manage-sandboxes.mdxwith the new flag and updated outputTesting
mise run pre-commitpassessandbox_get_policy_only_round_trip)Checklist